package com.atguigu04.override.exer1;

/**
 * ClassName: PersonTest
 * Description:
 *     修改继承内容的练习1中定义的类Kids，在Kids中重新定义employeed()方法，
 *    覆盖父类ManKind中定义的employeed()方法，输出"Kids should study and no job."
 * @Author liu
 * @Create 2024/10/27 19:19
 * @Version 1.0
 */
public class Kids extends Mankind {
    private int yearsOld;

    public Kids(){

    }

    public int getYearsOld() {
        return yearsOld;
    }

    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    public void printAge(){
        System.out.println("I am "+yearsOld+" year old");
    }

    public void employeed(){
        System.out.println("Kids should study and no job.");

    }

}
